package com.antler.smt.utils;

import java.text.ParseException;
import java.util.Date;

/**
 *  * TODO
 *  *
 *  * @author vic
 *  * @date 2018-03-28 22:08
 *  
 */
public class DateUtil {

    /**
     * 时间转化成时间戳
     *
     * @param date
     * @return
     * @throws ParseException
     */
    public static long dateToStamp(Date date) throws ParseException {
        long ts = date.getTime();
        return ts;
    }

    /*
     * 将时间戳转换为时间
     */
    public static Date stampToDate(long stamp) {
        Date date = new Date(stamp);
        return date;
    }
}
